<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" import="com.zzty.taskapp.entity.User"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<meta charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ZZTY</title>
<!-- BOOTSTRAP STYLES-->
<link href="css/bootstrap.css" rel="stylesheet" />

<!-- CUSTOM STYLES-->
<link href="css/custom.css" rel="stylesheet" />
<jsp:useBean id="bean1" class="com.zzty.taskapp.daoImpl.UserDAOImpl" />
<script type="text/javascript">
	function getwin() {
		window.location.href = 'UserServlet?method=getwinnerid';


	}
</script>
</head>
<body>
	<%
		String Date = bean1.getDate();
		String selfwin = (String) request.getAttribute("selfwin");
		String teamwin = (String) request.getAttribute("teamwin");
		User user = (User) request.getSession().getAttribute("user");
		String clazz = user.getClasses();
		String img = (String) user.getImg();
		if (selfwin == null)
			selfwin = "无记录";
		if (teamwin == null)
			teamwin = "无记录";
	%>
	<div id="wrapper">
		<nav class="navbar navbar-default navbar-cls-top " role="navigation"
			style="margin-bottom: 0">
			<div class="navbar-header">
				<!--                 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse"> -->
				<!--                     <span class="sr-only">Toggle navigation</span> -->
				<!--                     <span class="icon-bar"></span> -->
				<!--                     <span class="icon-bar"></span> -->
				<!--                     <span class="icon-bar"></span> -->
				<!--                 </button> -->
				<a class="navbar-brand">自在天原</a>
			</div>
			<div
				style="color: white;
padding: 15px 50px 5px 50px;
float: right;
font-size: 16px;">
				<form action="loginOut.jsp" method="post">
					<button type="submit" class="btn btn-danger">注销</button>
				</form>
			</div>
		</nav>
		<!-- /. NAV TOP  -->
		<nav class="navbar-default navbar-side" role="navigation">
			<div class="sidebar-collapse">
				<ul class="nav" id="main-menu">
					<li class="text-center"><img src="<%=img%>"
						class="user-image img-responsive" /></li>


					<li><a href="index.jsp"><i class="fa fa-dashboard fa-3x"></i>
							主页</a></li>
					<li><a href="jsp/UserInfo.jsp"><i
							class="fa fa-table fa-3x"></i> 个人信息</a></li>
					<li><a href="jsp/SelfExam.jsp"><i
							class="fa fa-desktop fa-3x"></i> 今日竞赛</a></li>
					<li><a href="jsp/TeamExam.jsp"><i
							class="fa fa-qrcode fa-3x"></i> 今日结对</a></li>
					<li><a href="jsp/History.jsp"><i
							class="fa fa-bar-chart-o fa-3x"></i> 历史记录</a></li>

					<li><a href="jsp/ChangePassword.jsp"><i
							class="fa fa-edit fa-3x"></i> 密码修改 </a></li>


				</ul>

			</div>

		</nav>
		<!-- /. NAV SIDE  -->
		<div id="page-wrapper">
			<div id="page-inner">
				<div class="row">
					<div class="col-md-12">
						<table class="table">

							<tbody>
								<tr>
									<td><div id="d" align="left" style="margin-top:0px">
											<h1><%=Date%></h1>
										</div></td>
									<td>
										<div id="d" align="right" style="margin-top:0px">
											<iframe id="fancybox-frame"
												name="fancybox-frame1497188085346" frameborder="0"
												scrolling="no" hspace="0"
												src="http://i.tianqi.com/index.php?c=code&a=getcode&id=38&h=60&w=610"></iframe>
										</div>
									</td>

								</tr>

							</tbody>
						</table>
						
						<div class="table-responsive">
							<table class="table table-striped " id="table1">
								<tr>
									<th>日期</th>
									<th>竞赛冠军</th>
								</tr>
								<%
									//bean1是引用javabean时自动创建的一个实例，使用bean1里面的selece方法并显示出来
									out.println(bean1.getfiveSelfWin(clazz));
								%>
								<tr>
									<th>日期</th>
									<th>结对冠军</th>
								</tr>
								<%
									//bean1是引用javabean时自动创建的一个实例，使用bean1里面的selece方法并显示出来
									out.println(bean1.getfiveTeamWin(clazz));
								%>
							</table>
						</div>
						
					</div>
				</div>
				<!-- /. ROW  -->
				<hr />

			</div>
			<!-- /. PAGE INNER  -->
		</div>
		<!-- /. PAGE WRAPPER  -->
	</div>
	<!-- /. WRAPPER  -->
	<!-- SCRIPTS -AT THE BOTOM TO REDUCE THE LOAD TIME-->
	<!-- JQUERY SCRIPTS -->
	<script src="js/jquery-1.10.2.js"></script>
	<!-- BOOTSTRAP SCRIPTS -->
	<script src="js/bootstrap.min.js"></script>
	<!-- METISMENU SCRIPTS -->
	<script src="js/jquery.metisMenu.js"></script>



</body>
</html>
